@extends('layouts.back_stage')
@section('content')
    <link rel="stylesheet" href="{{env('CDN_DOMAIN_NAME')}}/css/clothInfo.css?v=1.0.2">
    <div class="container">
        <div class="lining-btn">
            <h3 style="float:left;">面辅料档案</h3>
            <a class="lining-a lining-a1" href="/admin/fabric_unit_conversion">面辅料采购单位换算</a>
            <a class="lining-a" href="/admin/ingred_data">辅料资料</a>
            <a class="lining-a" href="/admin/fabric_data">面料资料</a>
            <a class="lining-a lining-a2" href="javascript:;" style="background:#27c24c;">面料色卡号定义</a>
            <a class="lining-a" href="/admin/cloth_info" >面辅料类型</a>
        </div>
        <ul class="lining-ul">
            {{--面料色卡号定义--}}
            <li id="swatch" class="lining-li">
                <div class="pantone-choose">
                    <form style="float:left;position:relative;" action="/admin/fabric_color_define" method="get">
                        <label>颜色名称：</label>
                        <input class="address souInp filterform" style="width:200px;padding-right:20px;" type="text" name="search_key" value="{{$search_key}}" placeholder="请输入">
                        <a href="javascript:;" class="login_a" style="display:none;"><img src="/img/00015.png"/></a>
                        <button type="submit" class="btn btn-info" style="margin-bottom:4px;">搜索</button>
                    </form>
                    <a class="btn bt_a btn-primary" href="javascript:;" onclick="addPantone()">添加</a>
                </div>
                <div class="pantone_tab">
                    <span style="display:none;" class="info_sum">{{$color_count}}</span>
                    <table class="pantone allCount" border="1" cellspacing="0" cellpadding="0">
                        <tr>
                            <td>编号</td><td>颜色名称</td>
                            <td>色系</td><td>潘通色号</td><td>备注</td><td>操作</td>
                        </tr>
                        @if(count($color) > 0)
                            @foreach($color as $v)
                                <tr class='pantone_{{ $v->id }}'>
                                    <td>{{ $v->num }}</td>
                                    <td class='names'>{{ $v->color_name }}</td>
                                    <td class='colour'>{{ $v->pantone_des }}</td>
                                    <td class='expl'>{{ $v->info }}</td>
                                    <td class='mark' style='background:#fff;'>{{ $v->remarks }}</td>
                                    <td>
                                        <a href="javascript:;" onclick="amendPantone({{ $v->id }})">修改</a>
                                        <a href="javascript:;" onclick="delPantone({{ $v->id }})">删除</a>
                                    </td>
                                </tr>
                            @endforeach
                        @endif
                    </table>

                    <span style="float: right;"><div style="float: right;margin:20px 0;">
                <button class="btn btn-info" onclick="returnPage()" style="float:right;">跳转</button>
                <input type="text" class="form-control returnPage" style="width:6rem;float: right;margin:0 5px;">
            </div>{{$color->appends(['search_key'=>$search_key])->links()}}</span>
                </div>
            </li>
        </ul>
    </div>
    {{--遮罩层--}}
    <div class="mask" style="display:none;"></div>
    {{--面料色卡号定义弹出框--}}
    <div class="rim" style="display:none;">
        <div class="rim_header">
            <span>添加信息</span>
            <button class="rim_close shut">×</button>
        </div>
        <div class="popup_cen">
            <lable>名称：<input class="popup_inp ip1" type="text" autocomplete="off" autocorrect="off" maxlength="7" placeholder="颜色名称(必)" /></lable>
            <lable>色系：<input class="popup_inp ip2" type="text" autocomplete="off" autocorrect="off" maxlength="7" placeholder="色系(必)" /></lable>
        </div>
        <div class="popup_cen">
            <lable>色号：<input class="popup_inp ip3" type="text" autocomplete="off" autocorrect="off" maxlength="7" placeholder="潘通色号" /></lable>
        </div>
        <div class="popup_cen">
            <textarea class="ip4" maxlength="15" placeholder="备注"></textarea>
        </div>
        <div class="popup_bottom">
            <input type="hidden" class="sum" value="0">
            <button class="popup_btn">确定</button>
        </div>
    </div>
    <script src="{{env('CDN_DOMAIN_NAME')}}/js/fabricColor.js?v=1.0.2"></script>
@endsection
